﻿using System.Collections.Generic;

namespace MvcWebScraper.Core.Parsers
{
	public class SoftbankCIDRParser : MobileCIDRScraper<List<string>>
	{
		protected override List<string> Parser(HtmlAgilityPack.HtmlDocument document)
		{
			var cidr = new List<string>();

			foreach (var tr in document.DocumentNode.SelectNodes("/html/body/div[@id='container']/div[@id='main']/div[1]/table/tr[2]/td/table/tr/td/div/table/tr[7]/td/table/tr/td/table/tr"))
			{
				var td = tr.SelectSingleNode("td");
				cidr.Add(td.InnerText.Replace("&nbsp;", "").Trim());
			}

			return cidr;
		}
	}
}
